<?php
class Group extends AppModel {

	var $name = 'Group';

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $hasAndBelongsToMany = array(
			'User' => array('className' => 'User',
						'joinTable' => 'groups_users',
						'foreignKey' => 'group_id',
						'associationForeignKey' => 'user_id',
						'unique' => true,
						'conditions' => '',
						'fields' => array("name","email"),
						'order' => '',
						'limit' => '',
						'offset' => '',
						'finderQuery' => '',
						'deleteQuery' => '',
						'insertQuery' => ''
			)
	);
	
	var $validate = array(
	   'name'=>array(
	       'alphanumeric' => array(
	           'rule' => 'alphaNumeric',
	           'message'=> 'Only alphabets and numbers allowed'
	       )   
	   )
	);

}
?>